/*
 * @Author: funlee
 * @Email: i@funlee.cn
 * @Date: 2018-01-11 22:26:22
 * @Last Modified time: 2018-01-11 22:26:22
 * @Description: 调色板 
 */
window.onload = function () {
  var canvas = document.querySelector('.canvas')
  var ctx = canvas.getContext('2d')
  for (var i = 0; i < 6; i++) {
    for (var j = 0; j < 6; j++) {
      ctx.fillStyle = 'rgb(' + Math.floor(255 - 42.5 * i) + ',' + Math.floor(255 - 42.5 * j) + ',0)'
      ctx.fillRect(j * 25, i * 25, 25, 25)
    }
  }
}
